package com.jiangjiang.eshop.comment.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName CommentInfoDTO
 * @Description
 * @Author jhw
 * @Date 2021/5/12 11:46
 * @Version 1.0
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName("comment_info")
public class CommentInfoEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 用户账号id
     */
    @TableField(value = "user_account_id")
    private Long userAccountId;
    /**
     * 用户名
     */
    @TableField(value = "user_name")
    private String username;
    /**
     * 订单信息id
     */
    @TableField(value = "order_info_id")
    private Long orderInfoId;
    /**
     * 订单条目id
     */
    @TableField(value = "order_item_id")
    private Long orderItemId;
    /**
     * 订单条目对应的商品id
     */
    @TableField(value = "goods_id")
    private Long goodsId;
    /**
     * 订单条目对应的商品sku id
     */
    @TableField(value = "goods_sku_id")
    private Long goodsSkuId;
    /**
     * 商品sku销售属性
     */
    @TableField(value = "goods_sku_sale_properties")
    private String goodsSkuSaleProperties;
    /**
     * 总评分：（商品评分 + 客服评论 + 物流评分） / 3
     */
    @TableField(value = "total_score")
    private Integer totalScore;
    /**
     * 商品评分
     */
    @TableField(value = "goods_score")
    private Integer goodsScore;
    /**
     * 客服评分
     */
    @TableField(value = "customer_service_score")
    private Integer customerServiceScore;
    /**
     * 物流评分
     */
    @TableField(value = "logistics_score")
    private Integer logisticsScore;
    /**
     * 评论内容
     */
    @TableField(value = "comment_content")
    private String commentContent;
    /**
     * 是否晒图
     */
    @TableField(value = "is_show_pictures")
    private Integer showPictures;
    /**
     * 是否是默认评论
     */
    @TableField(value = "is_default_comment")
    private Integer defaultComment;
    /**
     * 评论状态
     */
    @TableField(value = "comment_status")
    private Integer commentStatus;
    /**
     * 评论类型
     */
    @TableField(value = "comment_type")
    private Integer commentType;
    /**
     * 评论的创建时间
     */
    @TableField(value = "gmt_create", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date gmtCreate;
    /**
     * 评论的修改时间
     */
    @TableField(value = "gmt_modified", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date gmtModified;

}
